<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box2{
            color:cyan;
        }
    </style>
</head>
<script src="./JS/vue.js"></script>
<body>
    <div class="box">
        <h1>{{name}}</h1>
        <h2>{{age}}</h2>
        <h3>{{flag?answerY:answerN}}</h3>
        <div class="box2">{{hobby}}</div>

    </div>

    <script>
        let vm = new Vue({
            el:'.box',
            data:{
                name:'刘超超',
                age:'22',
                hobby:'玩手机,压马路,逛公园',
                flag:true,
                answerY:'学习了',
                answerN:'没学习'
            }
        })
        console.log(vm);
        vm.name = '刘超';
        vm.age = 24;
        console.log(vm);
    </script>
</body>
</html>